/************************************************************
 * Copyright (C), 2022-2030, ripnano. Co., Ltd.
 * FileName:        form_home.h
 * Author:          Dan Yin
 * Date:            2024-03-01
 * Description:     the class of home page
 * Version:         1.0.0.0
 **********************************************************/

#ifndef FORM_HOME_H
#define FORM_HOME_H

// add necessary includes here
#include "ui/defines/global.h"

class FormTesting;

namespace Ui {
class FormHome;
}

class FormHome : public QWidget
{
    Q_OBJECT

public:
    // Get an instance of "FormHome" class, if exist, return it
    static FormHome* getInstance(QWidget *pParent = nullptr);

    // The default destructor
    virtual ~FormHome();

signals:
    // The signal that refresh UI info
    void signalRefreshUI();

    // Show the test details info by test ID
    void showShowPageResultDetails(int nTestId);

private slots:
    // The slot that refresh UI info
    void slotRefreshUI();

protected:
    // Triggers an event before it is switch language
    void changeEvent(QEvent *event);

private:
    // The default constructor
    FormHome(QWidget *parent = nullptr);

    // After constructing object, initialize the object
    void _initialze();

    // Init the window style
    void _initUi();

private:
    Ui::FormHome *ui;

    FormTesting             *m_pFrmTesting = nullptr;
};

#endif // FORM_HOME_H
